home *** CD-ROM | disk | FTP | other *** search
/ GKGM 014 / GKGM014.iso / hentai / sex_kitten_sim_rpg.swf / scripts / DefineSprite_464 / frame_42 / PlaceObject2_424_269 / CLIPACTIONRECORD onClipEvent(enterFrame).as
Text File  |  2005-09-06  |  4KB  |  144 lines

  1. onClipEvent(enterFrame){
  2.    with(_root.hero)
  3.    {
  4.       if(Key.isDown(40) && !Key.isDown(37) && !Key.isDown(39))
  5.       {
  6.          if(_root.hero_face <= 8 || _root.hero_face > 12)
  7.          {
  8.             _root.hero_face = 9;
  9.          }
  10.          _root.hero_face += 1;
  11.          if(_root.hero_face == 13)
  12.          {
  13.             _root.hero_face = 9;
  14.          }
  15.          _root.hero_y += 8;
  16.       }
  17.       if(Key.isDown(38) && !Key.isDown(37) && !Key.isDown(39))
  18.       {
  19.          if(_root.hero_face > 4)
  20.          {
  21.             _root.hero_face = 1;
  22.          }
  23.          _root.hero_face += 1;
  24.          if(_root.hero_face == 5)
  25.          {
  26.             _root.hero_face = 1;
  27.          }
  28.          _root.hero_y -= 8;
  29.       }
  30.       if(Key.isDown(37) && !Key.isDown(40) && !Key.isDown(38))
  31.       {
  32.          if(_root.hero_face <= 12)
  33.          {
  34.             _root.hero_face = 13;
  35.          }
  36.          _root.hero_face += 1;
  37.          if(_root.hero_face == 17)
  38.          {
  39.             _root.hero_face = 13;
  40.          }
  41.          _root.hero_x -= 8;
  42.       }
  43.       if(Key.isDown(39) && !Key.isDown(40) && !Key.isDown(38))
  44.       {
  45.          if(_root.hero_face <= 4 || _root.hero_face > 8)
  46.          {
  47.             _root.hero_face = 5;
  48.          }
  49.          _root.hero_face += 1;
  50.          if(_root.hero_face == 9)
  51.          {
  52.             _root.hero_face = 5;
  53.          }
  54.          _root.hero_x += 8;
  55.       }
  56.       if(wall.hitTest(getBounds(_root).xMax,_y,true))
  57.       {
  58.          _root.hero_x -= 8;
  59.       }
  60.       if(wall.hitTest(getBounds(_root).xMin,_y,true))
  61.       {
  62.          _root.hero_x += 8;
  63.       }
  64.       if(wall.hitTest(_x,getBounds(_root).yMax,true))
  65.       {
  66.          _root.hero_y -= 8;
  67.       }
  68.       if(wall.hitTest(_x,getBounds(_root).yMin,true))
  69.       {
  70.          _root.hero_y += 8;
  71.       }
  72.       if(_root.front.door.hitTest(_x,getBounds(_root).yMax,true))
  73.       {
  74.          _root.hero_x = _root.hero_x_temp;
  75.          _root.hero_y = _root.hero_y_temp + 32;
  76.          _root.loc -= _root.house_level;
  77.       }
  78.       if(_root.front.person.hitTest(getBounds(_root).xMax,_y,true) || _root.front.person.hitTest(getBounds(_root).xMin,_y,true) || _root.front.person.hitTest(_x,getBounds(_root).yMax,true) || _root.front.person.hitTest(_x,getBounds(_root).yMin,true))
  79.       {
  80.          _root.help.gotoAndStop(2);
  81.          if(Key.isDown(32))
  82.          {
  83.             if(_root.weapon[1] == 1)
  84.             {
  85.                _root.house_loc = 122;
  86.                _root.play();
  87.             }
  88.             if(_root.weapon[1] == 2)
  89.             {
  90.                _root.house_loc = 124;
  91.                _root.play();
  92.             }
  93.             if(_root.weapon[1] == 3)
  94.             {
  95.                _root.house_loc = 126;
  96.                _root.play();
  97.             }
  98.             if(_root.weapon[1] == 4)
  99.             {
  100.                if(_root.object_1 >= 6)
  101.                {
  102.                   _root.house_loc = 128;
  103.                   _root.play();
  104.                }
  105.                else
  106.                {
  107.                   _root.house_loc = 127;
  108.                   _root.play();
  109.                }
  110.             }
  111.             if(_root.weapon[1] == 5)
  112.             {
  113.                _root.house_loc = 130;
  114.                _root.play();
  115.             }
  116.          }
  117.       }
  118.       else
  119.       {
  120.          _root.help.gotoAndStop(1);
  121.       }
  122.       if(_root.hero_x >= 480)
  123.       {
  124.          _root.loc += 1;
  125.          _root.hero_x = 48;
  126.       }
  127.       if(_root.hero_x <= 0)
  128.       {
  129.          _root.loc -= 1;
  130.          _root.hero_x = 456;
  131.       }
  132.       if(_root.hero_y >= 480)
  133.       {
  134.          _root.loc += _root.sq_level;
  135.          _root.hero_y = 48;
  136.       }
  137.       if(_root.hero_y <= 0)
  138.       {
  139.          _root.loc -= _root.sq_level;
  140.          _root.hero_y = 456;
  141.       }
  142.    }
  143. }
  144.